package com.qige.homework;

import java.util.Scanner;

public class homework1 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入一个字符串：");
        String str = input.next();
        System.out.println("录入的字符串:" + str);
        System.out.print("反转的字符串:");
        for (int i = str.length() - 1; i >= 0 ; i--) {
            System.out.print(str.charAt(i));
        }
    }
}
